package fragments;

import com.example.nfcook.R;
import com.example.nfcook.R.id;

import android.app.ActionBar.Tab;
import android.app.ActionBar.TabListener;
import android.app.Fragment;
import android.app.FragmentTransaction;
import android.widget.ListView;
import android.widget.Toast;

public class MyTabsListener implements TabListener {
	public Fragment fragment;
 
	public MyTabsListener(Fragment fragment) {
		this.fragment = fragment;
	}
 
	public void onTabReselected(Tab tab, FragmentTransaction ft) {
		//NADA
		//((TabsFragment)fragment).listaCategoriaUnica.setVisibility(ListView.VISIBLE);
		/*
		if(((TabsFragment)fragment).creado==1){
			((TabsFragment)fragment).listaCategoriaUnica.setVisibility(ListView.VISIBLE);
		}*/
	}
 
	public void onTabSelected(Tab tab, FragmentTransaction ft) {
		/*
		if(((TabsFragment)fragment).creado==1){
			((TabsFragment)fragment).listaCategoriaUnica.setVisibility(ListView.VISIBLE);
		}*/
		ft.replace(R.id.RelativeLayout1, fragment);
	}
 
	public void onTabUnselected(Tab tab, FragmentTransaction ft) {
		ft.remove(fragment);
	}
}